package com.smh.demo1.a29;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shiminghui
 * @date 2025/5/3 17:41
 * @description: TODO
 */
@RestController
public class Controller1 {
    @GetMapping("/test")
    public void test() {
        System.out.println(1 / 0);
    }

/*    @RequestMapping("/error")
    public Map<String,Object> error(HttpServletRequest request) {
        Throwable e = (Throwable) request.getAttribute(RequestDispatcher.ERROR_EXCEPTION);
        return Map.of("error",  e.getMessage());
    }*/
}
